package com.app.miwawa.api.esm.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.framework.common.api.entity.CommonEntityUUID;
import org.framework.common.api.support.constant.SystemConstants;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

@Entity @Table(name = "tb_esm_advisers_target")
public class AdviserTarget extends CommonEntityUUID{

	/** serialVersionUID(long):. */
	private static final long serialVersionUID = -944819524248246430L;

	//顾问id
	@Column(name = "adviserid", length = 50, nullable = true)
	private String adviserid;
	
	//业绩目标
	@Column(name = "target", nullable = true)
	private float target;
	
	//年份
	@Column(name = "year", nullable = true)
	private int year;
	
	//月份
	@Column(name = "month", nullable = true)
	private int month;
	
	//创建时间
	@Temporal(TemporalType.DATE)
	@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@Column(name = "create_date", nullable = true)
	private Date createDate;

	public AdviserTarget() {
		this.createDate = new Date();
		this.status = SystemConstants.DICT_STATUS_DEFAULT;
		this.invalid = SystemConstants.DICT_DELETE_INVALID;
	}	
	
	public String getAdviserid() {
		return adviserid;
	}

	public void setAdviserid(String adviserid) {
		this.adviserid = adviserid;
	}

	public float getTarget() {
		return target;
	}

	public void setTarget(float target) {
		this.target = target;
	}

	public int getYear() {
		return year;
	}

	public void setYear(int year) {
		this.year = year;
	}

	public int getMonth() {
		return month;
	}

	public void setMonth(int month) {
		this.month = month;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

}
